Computer devices typically include both volatile and non-volatile memory for storing data required to operate such devices. Traditional non-volatile memory, such as hard disk drives, retains stored data even when power is turned off to the memory. Thus, non-volatile memory retains its stored data content even when electrical power is removed, for example from an unexpected power loss, system crash, or normal shutdown of the computer system. The disadvantage with traditional non-volatile memory devices is access to stored data is relatively slow. In contrast, access times to data on volatile memory are fast, but such memory requires continuous power to retain data stored in such devices. Traditional volatile memory is dynamic random access memory (DRAM).
Recently, non-volatile dual in-line memory module (NVDIMM) devices have been used to leverage the speed of volatile memory, and the power independence from volatile memory. Thus, NVDIMM may be used as a type of random-access memory for computer devices such as a server. The term “dual in-line” identifies the memory as using the dual in-line memory module package similar to a dynamic random access memory (DRAM). The NVDIMM can thus use the high speed of a DRAM bus and provides quick memory accesses by components such as a processor in a computer device. A NVDIMM uses a standard DIMM type DRAM to generally store data. The NVDIMM also includes a flash memory. When power to the NVDIMM is cut off, the contents of the DRAM are copied to the flash memory. A microcontroller in the NVDIMM supervises the movement of the data from the DRAM to the flash memory when power is lost. The microcontroller also restores the backup data stored on the flash memory back into the DRAM of the NVDIMM when power is restored.
The flash memory feature for NVDIMMs allows data to be preserved in the event of an AC power supply failure as well as situations such as a system graceful shut down, a system power cycle, a CPU overheat, a platform controller hub (PCH) overheat and a system power overheat.
NVDIMMs improve application performance, data security, and system crash recovery time because data may simply be reloaded from the flash memory internal to the NVDIMM without having to retrieve the data from another source. This bypasses the need for additional access times for data from another source. Thus, NVDIMMs enhance reliability and endurance for devices such as solid-state drives (SSD).
One circumstance that occurs periodically is an update of the basic input output system (BIOS) of a computer device. The BIOS functions to boot up a computer device before loading the operating system. The BIOS also functions to manage data flow between processors and memory devices, such as NVDIMMs. The BIOS is usually fixed instructions, but periodically such instructions are updated to increase efficiency or correct firmware bugs.
However, the backup and restore functions to the flash memory of a NVDIMM leads to desired preserved data on the NVDIMM to be broken after such a BIOS update. Breaking preserved data on the NVDIMM occurs because the system will perform a power cycle to apply related setting changes after a BIOS update. The NVDIMM backup routine will write unknown data to the backup flash memory due to the power cycle routine being triggered. This backup procedure will thus overwrite the original desired data on the flash memory of the NVDIMM. This results in loss of the desired data and impedes proper functioning of the computer device because needed data is no longer stored on the NVDIMM.
When a BIOS update occurs, the NVDIMM backup mechanism will be triggered for preserving desired data stored on the NVDIMM DRAM to the flash memory because a power cycle is necessary. Thus, similar to circumstances such as an AC power loss, a graceful shutdown, or a system power cycle, the desired data is stored in the flash memory of the NVDIMM. However, after a BIOS update, the system will perform an additional timed power cycle to apply the related setting changes before memory initialization. When the system performs this power cycle, the NVDIMM is triggered to backup the unknown data on the DRAM to the flash memory. At that time, the original desired data on the flash drive will be overwritten by the unknown data currently stored on the DRAM. Thus, after the system power cycles again, the desired data is no longer available when the unknown data now stored on the flash memory is restored to the DRAM of the NVDIMM.
FIG. 1 shows a flow chart of a prior art power up routine applied after a BIOS updated is applied. FIG. 1 illustrates the problem of losing, or breaking, desired data stored on a NVDIMM when a BIOS update is applied to a known computer system. After a BIOS update is installed, the system will perform a power cycle to apply related setting changes. The power cycle results in the NVDIMM backing up the desired data in the DRAM in the flash memory prior to power down. The system is then powered down.
In order to apply the settings related to the BIOS updates, the system power is turned on again (10). The system will then determine whether a power cycle must be performed to apply platform related settings before memory initialization (12). If a power cycle is required to apply the platform related settings, the system will thus trigger the NVDIMM to copy the data in the DRAM to the flash memory (14). At this time, the unknown data now stored in the DRAM will overwrite the desired data on the flash memory of the NVDIMM. The routine then loops back to turn on system power (10). At this time, the platform related settings are applied (12), and thus a power cycle does not have to be performed and thus the routine proceeds to step 16 to start memory initialization.
The BIOS checks the NVDIMM to determine if data needs to be restored (16). If data needs to be restored, the system will wait for the BIOS to initiate data restore in the NVDIMM by copying the backup data from the flash memory to the DRAM (18). The desired data has therefore been broken since the desired data originally in the flash memory is replaced by unknown data in the DRAM prior to the power cycle. This unknown data is thus restored to the DRAM in the NVDIMM.
Once the data is restored from the flash memory, or if the data does not need to be restored, the system will complete the power on self-test routine (20). The system will continue to boot to the operating system (22). As may be seen in FIG. 1, desired data on the NVDIMM DRAM will be broken or lost because of the extra power up cycle, required by the BIOS update, causes the desired data to be replaced with unknown data. The desired data is thus not available to the system.
There is a need for a system that avoids triggering a NVDIMM to backup and restore unknown data after a BIOS update. There is a further need for a solution to disable the NVDIMM backup function prior to a system boot to prevent broken desired data. There is a further need for a routine to properly backup desired data during a power cycle after a BIOS update.